package com.xiaotou.common;

public enum Titles {
	newbie(0, 100, "小偷小摸");

	private int minExp;
	private int maxExp;
	private String title;

	public static Titles getTitles(int experience) {
		for (Titles t : Titles.values()) {
			if (t.minExp <= experience && t.maxExp >= experience) {
				return t;
			}
		}
		return Titles.newbie;
	}

	private Titles(int minExp, int maxExp, String title) {
		this.minExp = minExp;
		this.maxExp = maxExp;
		this.title = title;
	}

	public int getMinExp() {
		return minExp;
	}

	public int getMaxExp() {
		return maxExp;
	}

	public String getTitle() {
		return title;
	}

}
